<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    

    <title>Hexo 搭建步骤 | 钱猛的个人博客</title>
    <meta name="author" content="钱猛">
    
    <meta name="description" content="钱猛的个人博客。全栈发展向。无所谓做什么，只要是当前最感兴趣的事！随心、随性、随缘！">
    
    
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta property="og:title" content="Hexo 搭建步骤"/>
    <meta property="og:site_name" content="钱猛 &amp; 博客"/>

    
    <meta property="og:image" content="undefined"/>
    

    <link rel="icon" type="image/png" href="/qianmeng/favicon.png">
    <link rel="alternate" href="/qianmeng/atom.xml" title="钱猛 &amp; 博客" type="application/atom+xml">
    <link rel="stylesheet" href="/qianmeng/css/lib/materialize.min.css">
    <link rel="stylesheet" href="/qianmeng/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="/qianmeng/css/style.css" media="screen" type="text/css">

    
        <link rel="stylesheet" href="/qianmeng/css/lib/prettify-tomorrow-night-eighties.css" type="text/css">
    
    <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?fc7f849e9fbb3ea12b2683af4ccaa000";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>


<body>
    <img src="/weixin_favicon.png" style="position: absolute; left: -9999px; opacity: 0; filter: alpha(opacity=0);">

    <nav class="indigo">
    <div class="nav-wrapper">
        <a href="#" data-activates="main-menu" class="button-collapse">
            <i class="fa fa-navicon"></i>
        </a>
        <div class="">
            <a href="/" class="brand-logo hide-on-med-and-down">钱猛 &amp; 博客 | 
			<span style="color:#E91E63;font-size:18px;">
			<i class="fa fa-flag"></i><span id="busuanzi_value_site_pv"></span>. 
			<i class="fa fa-user"></i><span id="busuanzi_value_site_uv"></span>
			</span> 
			</a> 
            <ul class="right hide-on-med-and-down">
                
                    <li>
                        <a class="menu-home " href="/qianmeng" >
                            <i class="fa fa-home "></i>
                            
                            首页
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-archive " href="/qianmeng/archives" >
                            <i class="fa fa-archive "></i>
                            
                            归档
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                            <i class="fa fa-bookmark "></i>
                            
                            分类
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-tag " href="/qianmeng/tags" >
                            <i class="fa fa-tag "></i>
                            
                            标签
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-reading " href="/qianmeng/reading" >
                            <i class="fa fa-book "></i>
                            
                            读书
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-about " href="/qianmeng/about" >
                            <i class="fa fa-user "></i>
                            
                            关于
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-search modal-trigger " href="#search" >
                            <i class="fa fa-search "></i>
                            
                            搜索
                        </a>
                    </li>
                
            </ul>
            <div>
    <ul class="side-nav indigo darken-1" id="main-menu">
        
        <li class="side-user">
            <div class="row">
                <div class="col s4 no-padding">
                    <img class="avatar-image circle responsive-img" src="https://raw.githubusercontent.com/qianmeng/resources/master/head.jpg" alt="User Avatar">
                </div>
                <div class="info col s8 valign-wrapper no-padding">
                    <div class="valign">
                        <p class="name">钱猛</p>
                        <p class="desc">全栈工程师</p>
                    </div>
                </div>
            </div>
        </li>
        

        
            <li class="no-padding">
                <a class="waves-effect menu-home " href="/qianmeng" >
                    <i class="fa fa-home "></i>
                    
                    首页
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-archive " href="/qianmeng/archives" >
                    <i class="fa fa-archive "></i>
                    
                    归档
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                    <i class="fa fa-bookmark "></i>
                    
                    分类
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-tag " href="/qianmeng/tags" >
                    <i class="fa fa-tag "></i>
                    
                    标签
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-reading " href="/qianmeng/reading" >
                    <i class="fa fa-book "></i>
                    
                    读书
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-about " href="/qianmeng/about" >
                    <i class="fa fa-user "></i>
                    
                    关于
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-search modal-trigger " href="#search" >
                    <i class="fa fa-search "></i>
                    
                    搜索
                </a>
            </li>
        
    </ul>

    <ul class="side-nav indigo darken-1" id="category-menu">
    

            

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/总结/">
                    总结 <span class="right">9 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/个人总结/">
                    个人总结 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/会展总结/">
                    会展总结 <span class="right">3 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/个人技能/">
                    个人技能 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/公司管理/">
                    公司管理 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/编程经验/">
                    编程经验 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/面试/">
                    面试 <span class="right">6 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/Android/">
                    Android <span class="right">3 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/Python/">
                    Python <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/web/">
                    web <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/前端/">
                    前端 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/前端/">
                    前端 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/前端/AngularJs/">
                    AngularJs <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/后台/">
                    后台 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Apache-CXF/">
                    Apache-CXF <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Apache-Http-Server/">
                    Apache-Http-Server <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Ehcache/">
                    Ehcache <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Hibernate/">
                    Hibernate <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/MetaQ/">
                    MetaQ <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/架构/">
                    架构 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/架构/Hexo/">
                    Hexo <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/量化交易/">
                    量化交易 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/Matlab/">
                    Matlab <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/股票/">
                    股票 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/爬虫/">
                    爬虫 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/期货/">
                    期货 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/数据库/">
                    数据库 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/数据库/PostGreSQL/">
                    PostGreSQL <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/Android/">
                    Android <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/Android/Vollery/">
                    Vollery <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/IOS/">
                    IOS <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/IOS/itms-services/">
                    itms-services <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/网络/">
                    网络 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/网络/互联网协议/">
                    互联网协议 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/工具分享/">
                    工具分享 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/工具分享/系统工具/">
                    系统工具 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/微信/">
                    微信 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/微信/帐号区别/">
                    帐号区别 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/星座/">
                    星座 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/星座/归类/">
                    归类 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/星座/性格/">
                    性格 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/美女/">
                    美女 <span class="right">17 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/美女/素人/">
                    素人 <span class="right">17 篇</span></a>
                </a>
            </li>

        

    </ul>
</div>

        </div>
    </div>
</nav>

<div id="search" class="modal search-modal">
    <div class="row">
        <div class="input-field col s12">
              <input id="search-input" type="text">
              <label for="search-input">搜索</label>
        </div>

    </div>
    <div id="search-result" class="search-result col s12">

    </div>
</div>


    <main>
        <div class="container main-container">
    
<nav class="page-nav hide-on-small-only">
    <div class="nav-wrapper indigo">
        <span class="breadcrumb">当前位置（分类目录）</span>
        
            
    
    
    <a class="breadcrumb" href="/qianmeng/categories/架构/">架构</a><a class="breadcrumb" href="/qianmeng/categories/架构/Hexo/">Hexo</a>


        

        
    </div>
</nav>

<article>
    <div class="card">
        <div class="card-content">
            

            <div class="article-title">
                
    
        <h1>Hexo 搭建步骤</h1>
    


            </div>
            <i class="fa fa-pencil-square"></i><time class="pink-link-context" datetime="2016-05-15T10:06:50.000Z"><a href="/qianmeng/2016/05/15/Hexo 搭建步骤/">2016-05-15</a></time>

			<i class="fa fa-flag"></i><span id="busuanzi_value_page_pv"><i class="fa fa-spinner"></i></span> 人点击
            
    <div class="tags-row">
        
            <a href="/qianmeng/tags/Hexo/" class="chip pink lighten-1">Hexo</a>
        
            <a href="/qianmeng/tags/架构/" class="chip pink lighten-1">架构</a>
        
    </div>


            <div class="toc pink-link-context hide-on-med-and-down">
    <ol class="section table-of-contents"><li class="section table-of-contents-item section table-of-contents-level-4"><a class="section table-of-contents-link" href="#首先大体介绍下hexo环境要求"><span class="section table-of-contents-text">首先大体介绍下Hexo环境要求：</span></a></li><li class="section table-of-contents-item section table-of-contents-level-4"><a class="section table-of-contents-link" href="#然后就可以安装并使用hexo了"><span class="section table-of-contents-text">然后就可以安装并使用hexo了：</span></a></li><li class="section table-of-contents-item section table-of-contents-level-4"><a class="section table-of-contents-link" href="#最后就是发布网站到github上"><span class="section table-of-contents-text">最后就是发布网站到github上：</span></a></li><li class="section table-of-contents-item section table-of-contents-level-4"><a class="section table-of-contents-link" href="#总结"><span class="section table-of-contents-text">总结：</span></a></li></ol>
</div>


            <div class="entry pink-link-context">
                <p>&#x6700;&#x8FD1;&#x60F3;&#x5EFA;&#x4E00;&#x4E2A;&#x5C5E;&#x4E8E;&#x81EA;&#x5DF1;&#x7684;&#x7F51;&#x7AD9;&#xFF0C;&#x672C;&#x6765;&#x51C6;&#x5907;&#x4E70;&#x4E2A;&#x963F;&#x91CC;&#x7684;&#x4E91;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x7136;&#x540E;&#x5728;&#x4E70;&#x4E2A;&#x57DF;&#x540D;&#xFF0C;&#x540E;&#x6765;&#x65E0;&#x610F;&#x4E2D;&#x53D1;&#x73B0;&#x4E86;Hexo&#x8FD9;&#x4E2A;&#x795E;&#x5947;&#x7684;&#x4E1C;&#x897F;&#xFF0C;&#x5B83;&#x548C;github&#x914D;&#x5408;&#x8D77;&#x6765;&#xFF0C;&#x5B8C;&#x5168;&#x53EF;&#x4EE5;&#x5B9E;&#x73B0;&#x6211;&#x60F3;&#x8981;&#x505A;&#x7684;&#x4E1C;&#x897F;&#xFF0C;&#x76F4;&#x63A5;&#x4E3A;&#x6211;&#x7701;&#x4E0B;&#x4E86;&#x4E00;&#x7B14;&#x8D44;&#x91D1;&#x5440;&#xFF0C;&#x4E8E;&#x662F;&#x5468;&#x672B;&#x6CA1;&#x4E8B;&#x7684;&#x65F6;&#x5019;&#x82B1;&#x4E86;&#x4FE9;&#x5929;&#x65F6;&#x95F4;&#x628A;&#x81EA;&#x5DF1;&#x7684;&#x535A;&#x5BA2;&#x7CFB;&#x7EDF;&#x642D;&#x5EFA;&#x8D77;&#x6765;&#x4E86;&#xFF0C;&#x672C;&#x6765;&#x89C9;&#x5F97;&#x4E5F;&#x5C31;&#x662F;&#x4E00;&#x4FE9;&#x5C0F;&#x65F6;&#x7684;&#x4E8B;&#x60C5;&#xFF0C;&#x7ED3;&#x679C;&#x5F04;&#x4E86;&#x4FE9;&#x5929;&#xFF0C;&#x7ECF;&#x9A8C;&#x95EE;&#x9898;&#xFF0C;&#x4E0B;&#x9762;&#x8BB0;&#x5F55;&#x4E0B;&#x8FC7;&#x7A0B;&#xFF0C;&#x4F9B;&#x540E;&#x6765;&#x4EBA;&#x53C2;&#x8003;&#x4E0B;&#x3002;</p>
<p>&#x6211;&#x7684;&#x535A;&#x5BA2;&#x5730;&#x5740;:</p>
<p><a href="http://qianmeng.github.io" target="_blank" rel="external">http://qianmeng.github.io</a></p>
<a id="more"></a>
<h4 id="&#x9996;&#x5148;&#x5927;&#x4F53;&#x4ECB;&#x7ECD;&#x4E0B;hexo&#x73AF;&#x5883;&#x8981;&#x6C42;"><a href="#&#x9996;&#x5148;&#x5927;&#x4F53;&#x4ECB;&#x7ECD;&#x4E0B;Hexo&#x73AF;&#x5883;&#x8981;&#x6C42;&#xFF1A;" class="headerlink" title="&#x9996;&#x5148;&#x5927;&#x4F53;&#x4ECB;&#x7ECD;&#x4E0B;Hexo&#x73AF;&#x5883;&#x8981;&#x6C42;&#xFF1A;"></a>&#x9996;&#x5148;&#x5927;&#x4F53;&#x4ECB;&#x7ECD;&#x4E0B;Hexo&#x73AF;&#x5883;&#x8981;&#x6C42;&#xFF1A;</h4><pre><code>1.     &#x5B89;&#x88C5;nodejs &#xFF08;&#x5230;&#x5B98;&#x7F51;&#x4E0B;&#x8F7D;&#x6700;&#x65B0;&#x7248;&#x6216;&#x8005;&#x6700;&#x7A33;&#x5B9A;&#x7248;&#xFF0C;&#x4E00;&#x8DEF;&#x5B89;&#x88C5;&#x5373;&#x53EF; &#xFF09;
2.     &#x5B89;&#x88C5;Git&#xFF08;&#x628A;&#x5185;&#x5BB9;&#x63A8;&#x9001;&#x5230;github&#x4E0A;&#x4F7F;&#x7528;&#xFF09;
3.     github&#x8D26;&#x6237;&#xFF08;&#x4E5F;&#x7C7B;&#x4F3C;&#x4E8E;&#x4F60;&#x7F51;&#x7AD9;&#x7684;&#x670D;&#x52A1;&#x5668;&#x4E86;&#xFF09;
</code></pre><p>&#x6CE8;&#x610F;&#x70B9;&#xFF1A;nodejs &#x6700;&#x597D;&#x5B89;&#x88C5;&#x6700;&#x65B0;&#x7248;&#x672C;&#x6216;&#x8005;&#x6700;&#x7A33;&#x5B9A;&#x7248;&#x672C;&#xFF0C;&#x56E0;&#x4E3A;&#x6700;&#x65B0;hexo3.0 &#x5BF9;nodejs&#x7684;&#x7248;&#x672C;&#x6709;&#x8981;&#x6C42;</p>
<h4 id="&#x7136;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x5B89;&#x88C5;&#x5E76;&#x4F7F;&#x7528;hexo&#x4E86;"><a href="#&#x7136;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x5B89;&#x88C5;&#x5E76;&#x4F7F;&#x7528;hexo&#x4E86;&#xFF1A;" class="headerlink" title="&#x7136;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x5B89;&#x88C5;&#x5E76;&#x4F7F;&#x7528;hexo&#x4E86;&#xFF1A;"></a>&#x7136;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x5B89;&#x88C5;&#x5E76;&#x4F7F;&#x7528;hexo&#x4E86;&#xFF1A;</h4><pre><code>1.     npm install -g hexo-cli  &#xFF08;&#x5B89;&#x88C5;hexo&#xFF09;
2.     hexo init     &#xFF08;&#x521D;&#x59CB;&#x5316;hexo&#x73AF;&#x5883;&#xFF09;
3.     hexo generate &#xFF08;&#x751F;&#x6210;&#x9759;&#x6001;&#x754C;&#x9762;&#xFF09;  
4.     hexo server  &#xFF08;&#x542F;&#x52A8;hexo&#x670D;&#x52A1;&#x5668;&#xFF09;
</code></pre><p>&#x6D4F;&#x89C8;&#x5668;&#x8F93;&#x5165; <a href="http://localhost:4000" target="_blank" rel="external">http://localhost:4000</a> &#x770B;&#x4E0B;&#x6548;&#x679C;&#x5427;&#xFF01;</p>
<h4 id="&#x6700;&#x540E;&#x5C31;&#x662F;&#x53D1;&#x5E03;&#x7F51;&#x7AD9;&#x5230;github&#x4E0A;"><a href="#&#x6700;&#x540E;&#x5C31;&#x662F;&#x53D1;&#x5E03;&#x7F51;&#x7AD9;&#x5230;github&#x4E0A;&#xFF1A;" class="headerlink" title="&#x6700;&#x540E;&#x5C31;&#x662F;&#x53D1;&#x5E03;&#x7F51;&#x7AD9;&#x5230;github&#x4E0A;&#xFF1A;"></a>&#x6700;&#x540E;&#x5C31;&#x662F;&#x53D1;&#x5E03;&#x7F51;&#x7AD9;&#x5230;github&#x4E0A;&#xFF1A;</h4><p>1&#x3001;&#x5728;&#x81EA;&#x5DF1;&#x5EFA;&#x7ACB;&#x7684;&#x7F51;&#x7AD9;&#x76EE;&#x5F55;&#x4E0B;&#x6709;&#x4E2A;_config.yml &#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x4FEE;&#x6539;&#x53D1;&#x5E03;&#x76F8;&#x5173;&#x7684;&#x5185;&#x5BB9;</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">deploy:</span><br><span class="line"></span><br><span class="line">     type: git</span><br><span class="line"></span><br><span class="line">     repo:https://github.com/qianmeng/qianmeng.github.io.git</span><br><span class="line"></span><br><span class="line">     branch:master</span><br></pre></td></tr></table></figure>
<p>2&#x3001;`npm install hexo-deployer-git &#x2013;save &#xFF08;&#x5B89;&#x88C5;hexo-deployer-git &#x7C7B;&#x4F3C;&#x4E00;&#x4E2A;hexo&#x7684;git&#x5BA2;&#x6237;&#x7AEF;&#x5DE5;&#x5177;&#x5427;&#xFF09;</p>
<p>3&#x3001;&#x6267;&#x884C;<code>hexo deploy</code> &#xFF08;&#x8FD9;&#x91CC;&#x9700;&#x8981;&#x8F93;&#x5165;github&#x4E0A;&#x81EA;&#x5DF1;&#x7684;&#x8D26;&#x6237;&#x548C;&#x5BC6;&#x7801;&#xFF09;</p>
<p>&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x8F93;&#x5165; <a href="https://qianmeng.github.io" target="_blank" rel="external">https://qianmeng.github.io</a>  &#x770B;&#x4E0B;&#x6548;&#x679C;&#x5427;</p>
<p>&#x6CE8;&#xFF1A;&#x6BCF;&#x6B21;&#x53D1;&#x5E03;&#x7684;&#x65F6;&#x5019;&#x53EF;&#x4EE5;&#x6309;&#x8FD9;&#x79CD;&#x987A;&#x5E8F;&#x6267;&#x884C;&#xFF0C;&#x907F;&#x514D;&#x6539;&#x7684;&#x4E1C;&#x897F;&#x53D1;&#x5E03;&#x4E0D;&#x6210;&#x529F;&#xFF1A;</p>
<pre><code>1.     hexo clean
2.     hexo generate
3.     hexo deploy
</code></pre><p>&#x5F53;&#x7136;&#x4E0A;&#x9762;&#x7684;&#x597D;&#x591A;&#x547D;&#x4EE4;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7B80;&#x5199;&#x5B9E;&#x73B0;&#x4F8B;&#x5982;:</p>
<pre><code>hexo  g --&gt; hexo generate
hexo  d --&gt; hexo depoly
hexo  s --&gt; hexo server
</code></pre><p>&#x5230;&#x8FD9;&#x91CC;&#x4E00;&#x4E2A;&#x57FA;&#x4E8E;hexo&#x7684;&#x535A;&#x5BA2;&#x7F51;&#x7AD9;&#x5C31;&#x642D;&#x5EFA;&#x8D77;&#x6765;&#x4E86;&#x3002;</p>
<h4 id="&#x603B;&#x7ED3;"><a href="#&#x603B;&#x7ED3;&#xFF1A;" class="headerlink" title="&#x603B;&#x7ED3;&#xFF1A;"></a>&#x603B;&#x7ED3;&#xFF1A;</h4><p>&#x5F00;&#x5934;&#x8BF4;&#x6211;&#x82B1;&#x4E86;&#x4FE9;&#x5929;&#x65F6;&#x95F4;&#xFF0C;&#x5176;&#x5B9E;&#x4E3B;&#x8981;&#x662F;&#x6D6A;&#x8D39;&#x5728;&#x4F7F;&#x7528;&#x4E0A;&#xFF0C;&#x4E0D;&#x719F;&#x6089;&#xFF0C;&#x52A0;&#x4E0A;&#x4E0B;&#x8F7D;&#x7684;&#x4E3B;&#x9898;&#x5C11;&#x4E1C;&#x897F;&#xFF0C;&#x8981;&#x81EA;&#x884C;&#x6DFB;&#x52A0;&#xFF0C;&#x8FD9;&#x4E2A;&#x8FC7;&#x7A0B;&#x9047;&#x5230;&#x4E86;&#x4E0D;&#x5C11;&#x5751;&#xFF0C;&#x8FD9;&#x8FB9;&#x5C31;&#x4E0D;&#x4E00;&#x4E00;&#x8BF4;&#x4E86;&#xFF0C;&#x5982;&#x679C;&#x6709;&#x673A;&#x4F1A;&#x5728;&#x5355;&#x5217;&#x51FA;&#x7ECF;&#x5E38;&#x9047;&#x5230;&#x7684;&#x95EE;&#x9898;&#x3002;hexo&#x7684;&#x4F7F;&#x7528;&#xFF0C;&#x91CC;&#x9762;&#x5F88;&#x591A;&#x7EC6;&#x8282;&#x5C31;&#x4E0D;&#x4E00;&#x4E00;&#x5217;&#x51FA;&#x6765;&#x4E86;&#xFF0C;&#x7C7B;&#x4F3C;&#x8FD9;&#x6837;&#x7684;&#x8BF4;&#x660E;&#x6587;&#x7AE0;&#x592A;&#x591A;&#x5566;&#xFF01;</p>
<p>&#x57FA;&#x7840;&#x63A8;&#x8350;  &#x6781;&#x5BA2;&#x5B66;&#x9662;&#x7684;hexo&#x4F7F;&#x7528;&#x4E2D;&#x6587;&#x7248;  <a href="http://wiki.jikexueyuan.com/project/hexo-document/" target="_blank" rel="external">http://wiki.jikexueyuan.com/project/hexo-document/</a></p>
<p>hexo &#x4E3B;&#x9898;  <a href="https://hexo.io/themes/" target="_blank" rel="external">https://hexo.io/themes/</a></p>
<p>hexo &#x63D2;&#x4EF6;  <a href="https://hexo.io/plugins/" target="_blank" rel="external">https://hexo.io/plugins/</a></p>
<p>hexo  &#x8FD8;&#x662F;&#x86EE;&#x706B;&#xFF0C;&#x53EA;&#x662F;&#x4E4B;&#x524D;&#x4E0D;&#x77E5;&#x9053;&#xFF0C;&#x5173;&#x4E8E;&#x4F7F;&#x7528;&#x7684;&#x6587;&#x7AE0;&#x5F88;&#x591A;&#xFF0C;&#x5982;&#x679C;&#x611F;&#x5174;&#x8DA3;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x4E4B;&#x4E0A;&#x505A;&#x7684;&#x4E1C;&#x897F;&#x8FD8;&#x662F;&#x86EE;&#x591A;&#x7684;&#x3002;</p>

            </div>
        </div>
    </div>
</article>  
<div class="card"> 
	 <nav id="pagination" class="indigo" >
		
		<a style="float: left;" href="/qianmeng/2016/05/21/微信帐号相关总结/" >&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-left"></i>&nbsp;&nbsp;上一页</a>
		
		
		<a style="float: right;" href="/qianmeng/2016/05/10/Android 面试要点/" >&nbsp;&nbsp;&nbsp;&nbsp;下一页&nbsp;&nbsp;<i class="fa fa-arrow-right"></i>&nbsp;&nbsp;&nbsp;&nbsp;</a>
		
		<div class="clearfix"></div>
	</nav> 
</div>





    <section id="comment">
        <div class="card">
            <div class="card-content">
                <!-- Duoshuo Comment BEGIN -->
                <div class="ds-thread" data-thread-key="2016/05/15/Hexo 搭建步骤/" data-title="Hexo 搭建步骤" data-url="https://kidmid.gitee.io/qianmeng/qianmeng/2016/05/15/Hexo 搭建步骤/"></div>

                <script type="text/javascript">
                    console.log(document.querySelector('.ds-thread'));
                    var duoshuoQuery = {
                        short_name: 'kidmid'
                    };
                    (function() {
                        var ds = document.createElement('script');
                        ds.type = 'text/javascript';
                        ds.async = true;
                        ds.src = (document.location.protocol == 'https:'
                            ? 'https:'
                            : 'http:') + '//static.duoshuo.com/embed.js';
                        ds.charset = 'UTF-8';
                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
                    })();
                </script>
                <!-- Duoshuo Comment END -->
            </div>
        </div>
    </section>



</div>

        <div class="fixed-action-btn float-sitemap">
    <a class="btn-floating btn-large pink">
      <i class="fa fa-caret-square-o-up"></i>
    </a>
    <ul>
      <li><a class="btn-return-top btn-floating waves-effect green" title="回到顶部"><i class="fa fa-arrow-circle-o-up"></i></a></li>
      <li><a class="btn-floating waves-effect button-collapse yellow darken-1"  data-activates="main-menu" title="menu"><i class="fa fa-navicon"></i></a></li>
    </ul>
  </div>

    </main>
    <footer class="page-footer indigo darken-1">
    
    <div class="container">
        <div class="row">
            
            <div class="social-group col m3 s12">
                <h5 class="white-text">社交</h5>
                
                    <a class="social-link" href="https://github.com/qianmeng" target="_blank">
                        <i class="fa fa-2x fa-github"></i>
                    </a>
                
                    <a class="social-link" href="http://weibo.com/u/1819068247" target="_blank">
                        <i class="fa fa-2x fa-weibo"></i>
                    </a>
                
                    <a class="social-link" href="/atom.xml" target="_blank">
                        <i class="fa fa-2x fa-rss"></i>
                    </a>
                
            </div>
            

            
            <div class="col m9 s12">
                <h5 class="white-text">友情链接</h5>
                
                    <a class="social-link" href="http://blog.csdn.net/qian_meng" target="_blank">CSDN 地址</a>
                
                    <a class="social-link" href="https://github.com/qianmeng" target="_blank">Github地址</a>
                
            </div>
            
        </div>
    </div>
    

    <div class="footer-copyright pink-link-context">
        <div class="container">
            © 2016  All rights reserved. 
        </div>
    </div>
</footer> 
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>


    <noscript>
    <div class="noscript">
        <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
    </div>
</noscript>
<div class="noscript">
    <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
</div>


<script src="/qianmeng/js/jquery-2.1.1.min.js"></script>
<script src="/qianmeng/js/materialize.min.js"></script>

<script>
    (function($) {
        $(document).ready(function() {
            // 隐藏禁用javascript（针对微信内置浏览器）的提示
            $('.noscript').hide();

            // 图片缩放效果
            var $imgs = $('img').not('.slider-image').not('.avatar-image').not('.carousel-image').not('.card-cover-image').not('.qrcode');

            // 给图片加上点击放大效果（materialbox插件）
            $imgs.addClass('materialboxed').each(function(i, el) {
                $(this).attr('data-caption', $(this).attr('alt') || ' ');
            }).materialbox();

            // 优化表格的显示
            $('table').each(function() {
                var $table = $(this);
                // 除去多行代码的情况
                if ($table.find('pre').length == 0) {
                    $table.addClass('responsive-table striped bordered');
                }
            });

            // 首页幻灯片
            $('.slider').slider({indicators: true, full_width: true, interval: 8000});

            $(".button-collapse").sideNav();
            $(".category-menu").sideNav();

            // 针对gallery post
            $('.carousel').carousel({full_width: true});
            $('.carousel-control.prev').click(function() {
                $('.carousel').carousel('prev');
            });
            $('.carousel-control.next').click(function() {
                $('.carousel').carousel('next');
            });

            // 文章目录
            $('article').not('.simple-article').find('h1').add('h2').add('h3').add('h4').add('h5').add('h6').scrollSpy();
            // 修正文章目录的left-border颜色
            var color = $('.table-of-contents-text').css('color');
            $('.table-of-contents-link').css('border-left-color', color);

            // 针对移动端做的优化：FAB按钮点击一下收回
            if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
                $('.fixed-action-btn').addClass('click-to-toggle');
            }
            // 回到顶部
            $('.btn-return-top').click(function() {
                $('body, html').animate({
                    scrollTop: 0
                }, 500);
            });

            // 重置读书页面的Tab标签页的颜色
            $('li.tab a').hover(function() {
                $(this).toggleClass('text-lighten-4');
            });
            $('.indicator').addClass('pink lighten-2');

            
            // 添加new标签
            $('.menu-search').append('<span class="new badge pink"></span>');
            

            // 搜索功能
            $('.modal-trigger').leanModal();
            var searchXml = "search.xml";
            if (searchXml.length == 0) {
             	searchXml = "search.xml";
            }
            var searchPath = "/qianmeng/" + searchXml;
            initSearch(searchPath, 'search-input', 'search-result');
        });

        // 初始化搜索与匹配函数
        var initSearch = function(path, search_id, content_id) {
            'use strict';
            $.ajax({
                url: path,
                dataType: "xml",
                success: function(xmlResponse) {
                    // get the contents from search data
                    var datas = $("entry", xmlResponse).map(function() {
                        return {
                            title: $("title", this).text(),
                            content: $("content", this).text(),
                            url: $("url", this).text()
                        };
                    }).get();
                    var $input = document.getElementById(search_id);
                    var $resultContent = document.getElementById(content_id);
                    $input.addEventListener('input', function() {
                        var str = '<ul class=\"search-result-list\">';
                        var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                        $resultContent.innerHTML = "";
                        if (this.value.trim().length <= 0) {
                            return;
                        }
                        // perform local searching
                        datas.forEach(function(data) {
                            var isMatch = true;
                            var content_index = [];
                            var data_title = data.title.trim().toLowerCase();
                            var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                            var data_url = data.url;
                            var index_title = -1;
                            var index_content = -1;
                            var first_occur = -1;
                            // only match artiles with not empty titles and contents
                            if (data_title != '' && data_content != '') {
                                keywords.forEach(function(keyword, i) {
                                    index_title = data_title.indexOf(keyword);
                                    index_content = data_content.indexOf(keyword);
                                    if (index_title < 0 && index_content < 0) {
                                        isMatch = false;
                                    } else {
                                        if (index_content < 0) {
                                            index_content = 0;
                                        }
                                        if (i == 0) {
                                            first_occur = index_content;
                                        }
                                    }
                                });
                            }
                            // show search results
                            if (isMatch) {
                                keywords.forEach(function(keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    data_title = data_title.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
                                });

                                str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                                var content = data.content.trim().replace(/<[^>]+>/g, "");
                                if (first_occur >= 0) {
                                    // cut out 100 characters
                                    var start = first_occur - 20;
                                    var end = first_occur + 80;
                                    if (start < 0) {
                                        start = 0;
                                    }
                                    if (start == 0) {
                                        end = 100;
                                    }
                                    if (end > content.length) {
                                        end = content.length;
                                    }
                                    var match_content = content.substring(start, end);
                                    // highlight all keywords
                                    keywords.forEach(function(keyword) {
                                        var regS = new RegExp(keyword, "gi");
                                        match_content = match_content.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
                                    });

                                    str += "<p class=\"search-result\">..." + match_content + "...</p>"
                                }
                                str += "</li>";
                            }
                        });
                        str += "</ul>";
                        $resultContent.innerHTML = str;
                    });
                }
            });
        }
    })(jQuery);
</script>


<script src="/qianmeng/js/prettify.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("pre").addClass("prettyprint");
        prettyPrint();
    });
</script>




<script type="text/javascript" src="http://tajs.qq.com/stats?sId=56073371" charset="UTF-8"></script>



<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript" async
  src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>



	<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"6","bdPos":"right","bdTop":"145"},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

</body>
</html>
